home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / appkit.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  44 lines

  1. /* The global container, includes all objects of program. Manages mouse
  2.    and keyboard events, calls objects and application functions of program.
  3. */
  4.  
  5. #ifndef __APPLICATION_KIT
  6. #define __APPLICATION_KIT
  7.  
  8. #include "objkit.h"
  9. #include "global.h"
  10. #include "wmanager.h"
  11.  
  12. extern int application(int);
  13.  
  14. class ApplicationKit : public ObjectKit, public WindowManager
  15.     {
  16.     protected:
  17.         loc minsize;                   // Used with RESIZE, cells
  18.     int applExit;                  // Function from application to call before exit
  19.                        // f.e.: SAVE? (Y / N)
  20.     public:
  21.     ApplicationKit(int stp, loc minsz = loc(10, 10));
  22.         virtual int application(int n) { return ::application(n); } // To overload
  23.  
  24.     void set_exit(int n) { applExit = n; }
  25.     void set_call(Visible* s, Visible* t)
  26.         { s->set_call(get(t)); }
  27.     void set_point(Visible* s, Visible* t)
  28.         { s->set_point(get(t)); }
  29.  
  30.     int moveTo(int number);                // Make object active
  31.     int shift();  // go to the next object
  32.     Visible* remove(int number);    // remove from list but doesn't delete
  33.         void add(Visible* object);
  34.         void background(Visible* object); // Add 0-th object
  35.     void insert(Visible* object, int number); // add to the current position
  36.                      // and shift objects with largest numbers
  37.  
  38.     virtual void exe(int act = 0);
  39.     void F10_shift();
  40.     int mouse_shift(loc pos);
  41.     void F6_shift();
  42.     };
  43.  
  44. #endif __APPLICATION_KIT